home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_vim.idb / usr / freeware / share / vim / syntax / gp.vim.z / gp.vim
Encoding:
Text File  |  1998-10-28  |  2.3 KB  |  66 lines

  1. " Vim syntax file
  2. " Language:    gp (version 2.0)
  3. " Maintainer:    Karim Belabas <karim@mpim-bonn.mpg.de>
  4. " Last change:    1998 January 12
  5.  
  6. syntax clear
  7. " some control statements
  8. syntax keyword gpStatement    break return next
  9. syntax keyword gpConditional    if
  10. syntax keyword gpRepeat        until while for fordiv forprime forstep forvec
  11.  
  12. syntax keyword gpInterfaceKey    buffersize colors compatible debug debugmem
  13. syntax keyword gpInterfaceKey    echo format help histsize log logfile output
  14. syntax keyword gpInterfaceKey    parisize path primelimit prompt psfile
  15. syntax keyword gpInterfaceKey    realprecision seriesprecision simplify
  16. syntax keyword gpInterfaceKey    strictmatch timer
  17.  
  18. syntax match   gpInterface    "^\s*\\[a-z].*"
  19. syntax keyword gpInterface    default
  20. syntax keyword gpInput        read input
  21.  
  22. " functions
  23. syntax region  gpFunRegion oneline transparent start="^ *[a-zA-Z][_a-zA-Z0-9]*(" end=") *=" contains=gpFunction,gpArgs
  24. syntax match gpFunction contained "^\s*[a-zA-Z][_a-zA-Z0-9]*("me=e-1
  25. syntax match gpArgs contained "[a-zA-Z][a-zA-Z0-9]*"
  26.  
  27. " String and Character contstants
  28. " Highlight special characters (those which have a backslash) differently
  29. syntax match  gpSpecial contained "\\[ent\\]"
  30. syntax region gpString     start=+"+  skip=+\\\\\|\\"+  end=+"+  contains=gpSpecial
  31.  
  32. "comments
  33. syntax region gpComment    start="/\*"  end="\*/" contains=gpTodo
  34. syntax match  gpComment "\\\\.*" contains=gpTodo
  35. syntax keyword gpTodo contained    TODO
  36. syntax sync ccomment gpComment minlines=10
  37.  
  38. "catch errors caused by wrong parenthesis
  39. syntax region gpParen        transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial
  40. syntax match gpParenError    ")"
  41. syntax match gpInParen contained "[{}]"
  42.  
  43. if !exists("did_gp_syntax_inits")
  44.   let did_gp_syntax_inits = 1
  45.   highlight link gpConditional    Conditional
  46.   highlight link gpRepeat    Repeat
  47.   highlight link gpError    Error
  48.   highlight link gpParenError    gpError
  49.   highlight link gpInParen    gpError
  50.   highlight link gpStatement    Statement
  51.   highlight link gpString    String
  52.   highlight link gpComment    Comment
  53.   highlight link gpInterface    Type
  54.   highlight link gpInput    Type
  55.   highlight link gpInterfaceKey Statement
  56.   highlight link gpFunction    Function
  57.   " contained ones
  58.   highlight link gpSpecial    Special
  59.   highlight link gpTodo        Todo
  60.   highlight link gpArgs        Type
  61. endif
  62.  
  63. let b:current_syntax = "gp"
  64.  
  65. " vim: ts=8
  66.